import com.LCQ.crm.settings.domain.User;
import com.LCQ.crm.utils.DateTimeUtil;
import com.LCQ.crm.utils.SqlSessionUtil;
import com.LCQ.crm.utils.UUIDUtil;
import com.LCQ.crm.workbench.dao.ActivityDao;
import com.LCQ.crm.workbench.domain.Activity;
import org.apache.ibatis.session.SqlSession;

public class test04 {
    public static void main(String[] args) {
        SqlSession session = SqlSessionUtil.getSqlSession();
        ActivityDao activityDao = SqlSessionUtil.getSqlSession().getMapper(ActivityDao.class);
        Activity a = new Activity();
        a.setId(UUIDUtil.getUUID());
        a.setOwner("40f6cdea0bd34aceb77492a1656d9fb3");
        a.setName("济南进口博览会");
        a.setStartDate("2020-11-20");
        a.setEndDate("2020-12-21");
        a.setDescription("这个机会很好，很值得大力发展");
        a.setCost("15000");
        a.setCreateTime(DateTimeUtil.getSysTime());
        a.setCreateBy("张三");
        int res = activityDao.insert(a);
        session.commit();
        System.out.println(res);
    }
}
